package com.cloud.orange.orangeprovider.controller;

import dto.UserDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import service.UserService;

import javax.annotation.Resource;

@RestController
public class UserController {
    @Resource
    UserService userService;

    @GetMapping("user/{id}")
    public UserDTO findUser(@PathVariable String id) {
        return userService.findByUserId(id);
    }
}
